package com.itheima.d10_permission_modifiers;

public class Father {

    public void publicMethod(){
        System.out.println("publicMethod");
    }

    protected void protectedMethod(){
        System.out.println("protectedMethod");
    }

    void defaultMethod(){
        System.out.println("defaultMethod");
    }

    private void privateMethod(){
        System.out.println("privateMethod");
    }

    //情况1：同一个类中，都可以访问
    public void test(){
        publicMethod();
        protectedMethod();
        defaultMethod();
        privateMethod();
    }
}
